package com.boot.communal.paging;

import java.util.Map;

/**
 * 封装一些分页的参数
 *
 * @author 【zhouJie】
 */
public class PagingParam {

    public static final String PageNum = "pageNum";

    public static final String PageSize = "pageSize";

    public static final String Sort = "sort";

    public static final String Order = "order";

    public static Integer getPageNum(Map<String, Object> params) {
        return Integer.parseInt(params.get(PageNum).toString());
    }

    public static Integer getPageSize(Map<String, Object> params) {
        return Integer.parseInt(params.get(PageSize).toString());
    }

    public static String getSort(Map<String, Object> params) {
        return params.get(Sort).toString();
    }

    public static String getOrder(Map<String, Object> params) {
        return params.get(Order).toString();
    }

}
